package com.example.crm.repository;

import com.example.crm.entity.Right;
import com.example.crm.entity.Role;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

/**
 * @author lenovo
 */
public interface RightRepository extends JpaRepository<Right,String> {
    /**
     * 根据角色查询权限
     * @param role
     * @return
     */
    public List<Right> findRightsByRolesOrderByRightCode(Role role);
}